package edu.hwadee.BEIS.entity;
// default package

import java.sql.Timestamp;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;

/**
 * PublicTrainingBase entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "public_training_base", catalog = "beis")

public class PublicTrainingBase implements java.io.Serializable {

	// Fields

	private Integer publicTrainingbaseId;
	private SchoolBasicInfor schoolBasic;
	private String publicTrainingbaseName;
	private Integer publicTrainingbaseRoomCount;
	private String openingCourseName;
	private Integer courseCount;
	private Float courseHourCount;
	private Float consumablesMoney;
	private Integer receiveOutsideSchoolStudentCount;
	private Float receiveOutsideSchoolConsumalbesMoney;
	private Integer receiveInsideSchoolStudentCount;
	private Float receiveInsideSchoolConsumablesMoney;
	private Integer receiveSocializationPersonCount;
	private Float receiveSocializationConsumablesMoney;
	private Short countyAuditStatus;
	private Short cityAuditStatus;
	private Timestamp modifyTime;
	private Set<TrainingRoom> trainingRooms = new HashSet<TrainingRoom>(0);

	// Constructors

	/** default constructor */
	public PublicTrainingBase() {
	}

	/** minimal constructor */
	public PublicTrainingBase(SchoolBasicInfor schoolBasic, String publicTrainingbaseName,
			Integer publicTrainingbaseRoomCount, String openingCourseName, Integer courseCount, Float courseHourCount,
			Float consumablesMoney, Integer receiveOutsideSchoolStudentCount,
			Float receiveOutsideSchoolConsumalbesMoney, Integer receiveInsideSchoolStudentCount,
			Float receiveInsideSchoolConsumablesMoney, Integer receiveSocializationPersonCount,
			Float receiveSocializationConsumablesMoney, Short countyAuditStatus, Short cityAuditStatus,
			Timestamp modifyTime) {
		this.schoolBasic = schoolBasic;
		this.publicTrainingbaseName = publicTrainingbaseName;
		this.publicTrainingbaseRoomCount = publicTrainingbaseRoomCount;
		this.openingCourseName = openingCourseName;
		this.courseCount = courseCount;
		this.courseHourCount = courseHourCount;
		this.consumablesMoney = consumablesMoney;
		this.receiveOutsideSchoolStudentCount = receiveOutsideSchoolStudentCount;
		this.receiveOutsideSchoolConsumalbesMoney = receiveOutsideSchoolConsumalbesMoney;
		this.receiveInsideSchoolStudentCount = receiveInsideSchoolStudentCount;
		this.receiveInsideSchoolConsumablesMoney = receiveInsideSchoolConsumablesMoney;
		this.receiveSocializationPersonCount = receiveSocializationPersonCount;
		this.receiveSocializationConsumablesMoney = receiveSocializationConsumablesMoney;
		this.countyAuditStatus = countyAuditStatus;
		this.cityAuditStatus = cityAuditStatus;
		this.modifyTime = modifyTime;
	}

	/** full constructor */
	public PublicTrainingBase(SchoolBasicInfor schoolBasic, String publicTrainingbaseName,
			Integer publicTrainingbaseRoomCount, String openingCourseName, Integer courseCount, Float courseHourCount,
			Float consumablesMoney, Integer receiveOutsideSchoolStudentCount,
			Float receiveOutsideSchoolConsumalbesMoney, Integer receiveInsideSchoolStudentCount,
			Float receiveInsideSchoolConsumablesMoney, Integer receiveSocializationPersonCount,
			Float receiveSocializationConsumablesMoney, Short countyAuditStatus, Short cityAuditStatus,
			Timestamp modifyTime, Set<TrainingRoom> trainingRooms) {
		this.schoolBasic = schoolBasic;
		this.publicTrainingbaseName = publicTrainingbaseName;
		this.publicTrainingbaseRoomCount = publicTrainingbaseRoomCount;
		this.openingCourseName = openingCourseName;
		this.courseCount = courseCount;
		this.courseHourCount = courseHourCount;
		this.consumablesMoney = consumablesMoney;
		this.receiveOutsideSchoolStudentCount = receiveOutsideSchoolStudentCount;
		this.receiveOutsideSchoolConsumalbesMoney = receiveOutsideSchoolConsumalbesMoney;
		this.receiveInsideSchoolStudentCount = receiveInsideSchoolStudentCount;
		this.receiveInsideSchoolConsumablesMoney = receiveInsideSchoolConsumablesMoney;
		this.receiveSocializationPersonCount = receiveSocializationPersonCount;
		this.receiveSocializationConsumablesMoney = receiveSocializationConsumablesMoney;
		this.countyAuditStatus = countyAuditStatus;
		this.cityAuditStatus = cityAuditStatus;
		this.modifyTime = modifyTime;
		this.trainingRooms = trainingRooms;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "increment")
	@Id
	@GeneratedValue(generator = "generator")

	@Column(name = "public_trainingbase_id", unique = true, nullable = false)

	public Integer getPublicTrainingbaseId() {
		return this.publicTrainingbaseId;
	}

	public void setPublicTrainingbaseId(Integer publicTrainingbaseId) {
		this.publicTrainingbaseId = publicTrainingbaseId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "school_id", nullable = false)

	public SchoolBasicInfor getSchoolBasic() {
		return this.schoolBasic;
	}

	public void setSchoolBasic(SchoolBasicInfor schoolBasic) {
		this.schoolBasic = schoolBasic;
	}

	@Column(name = "public_trainingbase_name", nullable = false, length = 50)

	public String getPublicTrainingbaseName() {
		return this.publicTrainingbaseName;
	}

	public void setPublicTrainingbaseName(String publicTrainingbaseName) {
		this.publicTrainingbaseName = publicTrainingbaseName;
	}

	@Column(name = "public_trainingbase_room_count", nullable = false)

	public Integer getPublicTrainingbaseRoomCount() {
		return this.publicTrainingbaseRoomCount;
	}

	public void setPublicTrainingbaseRoomCount(Integer publicTrainingbaseRoomCount) {
		this.publicTrainingbaseRoomCount = publicTrainingbaseRoomCount;
	}

	@Column(name = "opening_course_name", nullable = false, length = 50)

	public String getOpeningCourseName() {
		return this.openingCourseName;
	}

	public void setOpeningCourseName(String openingCourseName) {
		this.openingCourseName = openingCourseName;
	}

	@Column(name = "course_count", nullable = false)

	public Integer getCourseCount() {
		return this.courseCount;
	}

	public void setCourseCount(Integer courseCount) {
		this.courseCount = courseCount;
	}

	@Column(name = "course_hour_count", nullable = false, precision = 12, scale = 0)

	public Float getCourseHourCount() {
		return this.courseHourCount;
	}

	public void setCourseHourCount(Float courseHourCount) {
		this.courseHourCount = courseHourCount;
	}

	@Column(name = "consumables_money", nullable = false, precision = 12, scale = 0)

	public Float getConsumablesMoney() {
		return this.consumablesMoney;
	}

	public void setConsumablesMoney(Float consumablesMoney) {
		this.consumablesMoney = consumablesMoney;
	}

	@Column(name = "receive_outside_school_student_count", nullable = false)

	public Integer getReceiveOutsideSchoolStudentCount() {
		return this.receiveOutsideSchoolStudentCount;
	}

	public void setReceiveOutsideSchoolStudentCount(Integer receiveOutsideSchoolStudentCount) {
		this.receiveOutsideSchoolStudentCount = receiveOutsideSchoolStudentCount;
	}

	@Column(name = "receive_outside_school_consumalbes_money", nullable = false, precision = 12, scale = 0)

	public Float getReceiveOutsideSchoolConsumalbesMoney() {
		return this.receiveOutsideSchoolConsumalbesMoney;
	}

	public void setReceiveOutsideSchoolConsumalbesMoney(Float receiveOutsideSchoolConsumalbesMoney) {
		this.receiveOutsideSchoolConsumalbesMoney = receiveOutsideSchoolConsumalbesMoney;
	}

	@Column(name = "receive_inside_school_student_count", nullable = false)

	public Integer getReceiveInsideSchoolStudentCount() {
		return this.receiveInsideSchoolStudentCount;
	}

	public void setReceiveInsideSchoolStudentCount(Integer receiveInsideSchoolStudentCount) {
		this.receiveInsideSchoolStudentCount = receiveInsideSchoolStudentCount;
	}

	@Column(name = "receive_inside_school_consumables_money", nullable = false, precision = 12, scale = 0)

	public Float getReceiveInsideSchoolConsumablesMoney() {
		return this.receiveInsideSchoolConsumablesMoney;
	}

	public void setReceiveInsideSchoolConsumablesMoney(Float receiveInsideSchoolConsumablesMoney) {
		this.receiveInsideSchoolConsumablesMoney = receiveInsideSchoolConsumablesMoney;
	}

	@Column(name = "receive_socialization_person_count", nullable = false)

	public Integer getReceiveSocializationPersonCount() {
		return this.receiveSocializationPersonCount;
	}

	public void setReceiveSocializationPersonCount(Integer receiveSocializationPersonCount) {
		this.receiveSocializationPersonCount = receiveSocializationPersonCount;
	}

	@Column(name = "receive_socialization_consumables_money", nullable = false, precision = 12, scale = 0)

	public Float getReceiveSocializationConsumablesMoney() {
		return this.receiveSocializationConsumablesMoney;
	}

	public void setReceiveSocializationConsumablesMoney(Float receiveSocializationConsumablesMoney) {
		this.receiveSocializationConsumablesMoney = receiveSocializationConsumablesMoney;
	}

	@Column(name = "county_auditstatus", nullable = false)

	public Short getCountyAuditStatus() {
		return this.countyAuditStatus;
	}

	public void setCountyAuditStatus(Short countyAuditStatus) {
		this.countyAuditStatus = countyAuditStatus;
	}

	@Column(name = "city_auditstatus", nullable = false)

	public Short getCityAuditStatus() {
		return this.cityAuditStatus;
	}

	public void setCityAuditStatus(Short cityAuditStatus) {
		this.cityAuditStatus = cityAuditStatus;
	}

	@Column(name = "modify_time", nullable = false, length = 19)

	public Timestamp getModifyTime() {
		return this.modifyTime;
	}

	public void setModifyTime(Timestamp modifyTime) {
		this.modifyTime = modifyTime;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "publicTrainingBase")

	public Set<TrainingRoom> getTrainingRooms() {
		return this.trainingRooms;
	}

	public void setTrainingRooms(Set<TrainingRoom> trainingRooms) {
		this.trainingRooms = trainingRooms;
	}

}